/**
 * Copyright (c) 2013 Mark Tielemans
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * DISCLAIMER
 * This software is provided "as is" and any expressed or implied warranties, including, but not limited to, the implied warranties of 
 * merchantability and fitness for a particular purpose are disclaimed. In no event shall the regents or contributors be liable for any 
 * direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute 
 * goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in 
 * contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if 
 * advised of the possibility of such damage.
 */
package nl.marktielemans.easydb.model;

import nl.marktielemans.easydb.DatabaseVendor;
import nl.marktielemans.easydb.generator.QueryGenerator;

/**
 * Represents a database Data Type. Its name property is used in queries generated by 
 * {@link QueryGenerator}s. This class can be expanded for support of not-yet supported 
 * {@link DatabaseVendor DatabaseVendors}.
 * 
 * @author Mark Tielemans
 * @since 1.0
 * @version 1.0
 */
public class DataType {
	public static final DataType VARCHAR = new DataType("varchar");
	public static final DataType CHAR = new DataType("char");
	public static final DataType TEXT = new DataType("text");
	public static final DataType BLOB = new DataType("blob");
	public static final DataType DATE = new DataType("date");
	public static final DataType INT = new DataType("int");
	
	protected String name;
	
	public DataType(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
	
	@Override
	public String toString() {
		return name;
	}
}
